<!--

     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.

-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- **************************************************************** -->
<!-- *  PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
<!-- *  i.e. only iterate & print data where possible. Thanks, Jez. * -->
<!-- **************************************************************** -->

<html>
<head>
    <!-- Generated by groovydoc (2.4.7) on Thu Dec 01 22:36:11 PST 2016 -->
    <title>ResourceFacade (Moqui Framework 2.0.0)</title>
    <meta name="date" content="2016-12-01">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
    <link href="../../../groovy.ico" type="image/x-icon" rel="icon">
    <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
    parent.document.title="ResourceFacade (Moqui Framework 2.0.0)";
}
//-->
</script>
<noscript>
    <div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
    <!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
    <!--   -->
</a>
    <ul class="navList" title="Navigation">
        <li><a href="../../../overview-summary.html">Overview</a></li>
        <li><a href="package-summary.html">Package</a></li>
        <li class="navBarCell1Rev">Class</li>
        <li><a href="../../../deprecated-list.html">Deprecated</a></li>
        <li><a href="../../../index-all.html">Index</a></li>
        <li><a href="../../../help-doc.html">Help</a></li>
    </ul>
</div>

<div class="subNav">
    <div>
        <ul class="navList">
            <li><a href="../../../index.html?org/moqui/context/ResourceFacade" target="_top">Frames</a></li>
            <li><a href="ResourceFacade.html" target="_top">No Frames</a></li>
        </ul>
    </div>
    <div>
        <ul class="subNavList">
            <li>Summary:&nbsp;</li>
            Nested&nbsp;&nbsp;&nbsp;Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#method_summary">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
        <ul class="subNavList">
            <li>&nbsp;|&nbsp;Detail:&nbsp;</li>
            Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#method_detail">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
    </div>
    <a name="skip-navbar_top">
        <!--   -->
    </a></div>
<!-- ========= END OF TOP NAVBAR ========= -->

<!-- ======== START OF CLASS DATA ======== -->
<div class="header">

    <div class="subTitle">Package: <strong>org.moqui.context</strong></div>

    <h2 title="[Java] Interface ResourceFacade" class="title">[Java] Interface ResourceFacade</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">

</ul>
<div class="description">
    <ul class="blockList">
        <li class="blockList">


    <p> For accessing resources by location string (http://, jar://, component://, content://, classpath://, etc). </p>

          </li>
    </ul>
</div>

<div class="summary">
    <ul class="blockList">
        <li class="blockList">
        <!-- =========== NESTED CLASS SUMMARY =========== -->
        

        <!-- =========== ENUM CONSTANT SUMMARY =========== -->
        
        <!-- =========== FIELD SUMMARY =========== -->
        

        <!-- =========== PROPERTY SUMMARY =========== -->
        

        <!-- =========== ELEMENT SUMMARY =========== -->
        

        

        
        <!-- ========== METHOD SUMMARY =========== -->
        <ul class="blockList">
            
            <li class="blockList"><a name="method_summary"><!--   --></a>
                    <h3>Methods Summary</h3>
                    <ul class="blockList">
                    <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Methods Summary table">
                        <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
                        <tr>
                            <th class="colFirst" scope="col">Type</th>
                            <th class="colLast" scope="col">Name and description</th>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>boolean</strong></code></td>
                            <td class="colLast"><code><strong><a href="#condition(java.lang.String, java.lang.String)">condition</a></strong>(java.lang.String expression, java.lang.String debugLocation)</code><br>Evaluate a Groovy expression as a condition.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>boolean</strong></code></td>
                            <td class="colLast"><code><strong><a href="#condition(java.lang.String, java.lang.String, java.util.Map)">condition</a></strong>(java.lang.String expression, java.lang.String debugLocation, java.util.Map additionalContext)</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>java.lang.String</strong></code></td>
                            <td class="colLast"><code><strong><a href="#expand(java.lang.String, java.lang.String)">expand</a></strong>(java.lang.String inputString, java.lang.String debugLocation)</code><br>Evaluate a Groovy expression as a GString to be expanded/interpolated into a simple String.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>java.lang.String</strong></code></td>
                            <td class="colLast"><code><strong><a href="#expand(java.lang.String, java.lang.String, java.util.Map)">expand</a></strong>(java.lang.String inputString, java.lang.String debugLocation, java.util.Map additionalContext)</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>java.lang.String</strong></code></td>
                            <td class="colLast"><code><strong><a href="#expand(java.lang.String, java.lang.String, java.util.Map, boolean)">expand</a></strong>(java.lang.String inputString, java.lang.String debugLocation, java.util.Map additionalContext, boolean localize)</code><br></td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>java.lang.String</strong></code></td>
                            <td class="colLast"><code><strong><a href="#expandNoL10n(java.lang.String, java.lang.String)">expandNoL10n</a></strong>(java.lang.String inputString, java.lang.String debugLocation)</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>java.lang.Object</strong></code></td>
                            <td class="colLast"><code><strong><a href="#expression(java.lang.String, java.lang.String)">expression</a></strong>(java.lang.String expr, java.lang.String debugLocation)</code><br>Evaluate a Groovy expression as a context field, or more generally as an expression that evaluates to an Object
 reference. </td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>java.lang.Object</strong></code></td>
                            <td class="colLast"><code><strong><a href="#expression(java.lang.String, java.lang.String, java.util.Map)">expression</a></strong>(java.lang.String expr, java.lang.String debugLocation, java.util.Map additionalContext)</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>java.lang.String</strong></code></td>
                            <td class="colLast"><code><strong><a href="#getContentType(java.lang.String)">getContentType</a></strong>(java.lang.String filename)</code><br></td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>javax.activation.DataSource</strong></code></td>
                            <td class="colLast"><code><strong><a href="#getLocationDataSource(java.lang.String)">getLocationDataSource</a></strong>(java.lang.String location)</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>org.moqui.resource.ResourceReference</strong></code></td>
                            <td class="colLast"><code><strong><a href="#getLocationReference(java.lang.String)">getLocationReference</a></strong>(java.lang.String location)</code><br>Get a ResourceReference representing the Moqui location string passed.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>java.io.InputStream</strong></code></td>
                            <td class="colLast"><code><strong><a href="#getLocationStream(java.lang.String)">getLocationStream</a></strong>(java.lang.String location)</code><br>Open an InputStream to read the contents of a file/document at a location.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>java.lang.String</strong></code></td>
                            <td class="colLast"><code><strong><a href="#getLocationText(java.lang.String, boolean)">getLocationText</a></strong>(java.lang.String location, boolean cache)</code><br>Get the text at the given location, optionally from the cache (resource.text.location).</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>java.lang.Object</strong></code></td>
                            <td class="colLast"><code><strong><a href="#script(java.lang.String, java.lang.String)">script</a></strong>(java.lang.String location, java.lang.String method)</code><br>Run a script at the given location (optionally with the given method, like in a groovy class) using the current
 context for its variable space.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>java.lang.Object</strong></code></td>
                            <td class="colLast"><code><strong><a href="#script(java.lang.String, java.lang.String, java.util.Map)">script</a></strong>(java.lang.String location, java.lang.String method, java.util.Map additionalContext)</code><br></td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#template(java.lang.String, java.io.Writer)">template</a></strong>(java.lang.String location, java.io.Writer writer)</code><br>Render a template at the given location using the current context and write the output to the given writer.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#xslFoTransform(javax.xml.transform.stream.StreamSource, javax.xml.transform.stream.StreamSource, java.io.OutputStream, java.lang.String)">xslFoTransform</a></strong>(javax.xml.transform.stream.StreamSource xslFoSrc, javax.xml.transform.stream.StreamSource xsltSrc, java.io.OutputStream out, java.lang.String contentType)</code><br></td>
                        </tr>
                        
                    </table>
                   </ul>
              </li>
            
        </ul>
        
    </li>
    </ul>
</div>

<div class="details">
    <ul class="blockList">
        <li class="blockList">
           

            

            

            

            


            
            <!-- =========== METHOD DETAIL =========== -->
            <ul class="blockList">
                <li class="blockList"><a name="method_detail">
                    <!--   -->
                </a>
                    <h3>Method Detail</h3>
                    
                        <a name="condition(java.lang.String, java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;boolean <strong>condition</strong>(java.lang.String expression, java.lang.String debugLocation)</h4>
                                <p> Evaluate a Groovy expression as a condition.
     <DL><DT><B>Returns:</B></DT><DD>boolean representing the result of evaluating the expression</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="condition(java.lang.String, java.lang.String, java.util.Map)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;boolean <strong>condition</strong>(java.lang.String expression, java.lang.String debugLocation, java.util.Map additionalContext)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="expand(java.lang.String, java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;java.lang.String <strong>expand</strong>(java.lang.String inputString, java.lang.String debugLocation)</h4>
                                <p> Evaluate a Groovy expression as a GString to be expanded/interpolated into a simple String.

 NOTE: the inputString is always run through the L10nFacade.localize() method before evaluating the
 expression in order to implicitly internationalize string expansion.
     <DL><DT><B>Returns:</B></DT><DD>String representing localized and expanded inputString</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="expand(java.lang.String, java.lang.String, java.util.Map)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;java.lang.String <strong>expand</strong>(java.lang.String inputString, java.lang.String debugLocation, java.util.Map additionalContext)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="expand(java.lang.String, java.lang.String, java.util.Map, boolean)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;java.lang.String <strong>expand</strong>(java.lang.String inputString, java.lang.String debugLocation, java.util.Map additionalContext, boolean localize)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="expandNoL10n(java.lang.String, java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;java.lang.String <strong>expandNoL10n</strong>(java.lang.String inputString, java.lang.String debugLocation)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="expression(java.lang.String, java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;java.lang.Object <strong>expression</strong>(java.lang.String expr, java.lang.String debugLocation)</h4>
                                <p> Evaluate a Groovy expression as a context field, or more generally as an expression that evaluates to an Object
 reference. This can be used to get a value from an expression or to run any general expression or script.
     <DL><DT><B>Returns:</B></DT><DD>Object reference representing result of evaluating the expression</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="expression(java.lang.String, java.lang.String, java.util.Map)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;java.lang.Object <strong>expression</strong>(java.lang.String expr, java.lang.String debugLocation, java.util.Map additionalContext)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="getContentType(java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;java.lang.String <strong>getContentType</strong>(java.lang.String filename)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="getLocationDataSource(java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;javax.activation.DataSource <strong>getLocationDataSource</strong>(java.lang.String location)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="getLocationReference(java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;org.moqui.resource.ResourceReference <strong>getLocationReference</strong>(java.lang.String location)</h4>
                                <p> Get a ResourceReference representing the Moqui location string passed.
     <DL><DT><B>Parameters:</B></DT><DD><code>location</code> -  A URL-style location string. In addition to the standard URL protocols (http, https, ftp, jar,
 and file) can also have the special Moqui protocols of "component://" for a resource location relative to a
 component base location, "content://" for a resource in the content repository, and "classpath://" to get a
 resource from the Java classpath.</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="getLocationStream(java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;java.io.InputStream <strong>getLocationStream</strong>(java.lang.String location)</h4>
                                <p> Open an InputStream to read the contents of a file/document at a location.
     <DL><DT><B>Parameters:</B></DT><DD><code>location</code> -  A URL-style location string that also support the Moqui-specific component and content protocols.</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="getLocationText(java.lang.String, boolean)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;java.lang.String <strong>getLocationText</strong>(java.lang.String location, boolean cache)</h4>
                                <p> Get the text at the given location, optionally from the cache (resource.text.location). </p>
                            </li>
                        </ul>
                    
                        <a name="script(java.lang.String, java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;java.lang.Object <strong>script</strong>(java.lang.String location, java.lang.String method)</h4>
                                <p> Run a script at the given location (optionally with the given method, like in a groovy class) using the current
 context for its variable space.
     <DL><DT><B>Returns:</B></DT><DD>The value returned by the script, if any.</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="script(java.lang.String, java.lang.String, java.util.Map)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;java.lang.Object <strong>script</strong>(java.lang.String location, java.lang.String method, java.util.Map additionalContext)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="template(java.lang.String, java.io.Writer)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;void <strong>template</strong>(java.lang.String location, java.io.Writer writer)</h4>
                                <p> Render a template at the given location using the current context and write the output to the given writer. </p>
                            </li>
                        </ul>
                    
                        <a name="xslFoTransform(javax.xml.transform.stream.StreamSource, javax.xml.transform.stream.StreamSource, java.io.OutputStream, java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;void <strong>xslFoTransform</strong>(javax.xml.transform.stream.StreamSource xslFoSrc, javax.xml.transform.stream.StreamSource xsltSrc, java.io.OutputStream out, java.lang.String contentType)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                </li>
            </ul>
            
        </li>
    </ul>
</div>

<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
    <!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
    <!--   -->
</a>
    <ul class="navList" title="Navigation">
        <li><a href="../../../overview-summary.html">Overview</a></li>
        <li><a href="package-summary.html">Package</a></li>
        <li class="navBarCell1Rev">Class</li>
        <li><a href="../../../deprecated-list.html">Deprecated</a></li>
        <li><a href="../../../index-all.html">Index</a></li>
        <li><a href="../../../help-doc.html">Help</a></li>
    </ul>
</div>

<div class="subNav">
    <div>
        <ul class="navList">
            <li><a href="../../../index.html?org/moqui/context/ResourceFacade" target="_top">Frames</a></li>
            <li><a href="ResourceFacade.html" target="_top">No Frames</a></li>
        </ul>
    </div>
    <div>
        <ul class="subNavList">
            <li>Summary:&nbsp;</li>
            Nested&nbsp;&nbsp;&nbsp;Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#method_summary">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
        <ul class="subNavList">
            <li>&nbsp;|&nbsp;Detail:&nbsp;</li>
            Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#method_detail">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
    </div>
    <p>Groovy Documentation</p>
    <a name="skip-navbar_bottom">
        <!--   -->
    </a>
    </div>
</div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
